home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / daemons / ipServer / route.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-16  |  1.5 KB  |  51 lines

  1. /*
  2.  * route.h --
  3.  *
  4.  *    Global declarations of the routing routines.
  5.  *
  6.  * Copyright 1987 Regents of the University of California
  7.  * All rights reserved.
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  * $Header: /sprite/src/daemons/ipServer/RCS/route.h,v 1.4 89/08/15 19:55:36 rab Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _IPS_ROUTE
  20. #define _IPS_ROUTE
  21.  
  22.  
  23. #include "sprite.h"
  24. #include "net.h"
  25.  
  26. /*
  27.  * Rte_NetID identifies the network interface that a  packet came in on
  28.  * or should be sent to. The fields are private to the Route module.
  29.  */
  30.  
  31. typedef struct {
  32.     int         net;    /* Network interface number. */
  33.     int         host;   /* Host number on that network. */
  34. } Rte_NetID;
  35.  
  36. extern void        Rte_AddressInit();
  37. extern Boolean        Rte_AddrIsForUs();
  38. extern Boolean        Rte_FindOutputNet();
  39. extern ReturnStatus    Rte_OutputPacket();
  40. extern ReturnStatus    Rte_RegisterNet();
  41. extern ReturnStatus    Rte_RegisterAddr();
  42. extern unsigned int    Rte_GetNetNum();
  43. extern Net_InetAddress    Rte_GetBroadcastAddr();
  44. extern Net_InetAddress    Rte_GetOfficialAddr();
  45. extern unsigned int    Rte_GetSubnetMask();
  46. extern Boolean        Rte_IsBroadcastAddr();
  47. extern Boolean        Rte_IsLocalAddr();
  48.  
  49.  
  50. #endif /* _IPS_ROUTE */
  51.